<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>科技感视频作品集</title>
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Rajdhani:wght@300;400;500;600;700&display=swap');
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: #0a0a16;
            color: #e0e0ff;
            padding: 0;
            min-height: 100vh;
            position: relative;
            overflow-x: hidden;
        }
        
        /* 背景网格和科技感效果 */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: 
                linear-gradient(rgba(10, 10, 22, 0.8) 1px, transparent 1px),
                linear-gradient(90deg, rgba(10, 10, 22, 0.8) 1px, transparent 1px);
            background-size: 40px 40px;
            z-index: -2;
        }
        
        body::after {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.1) 0%, rgba(10, 10, 22, 0) 70%);
            z-index: -1;
        }
        
        /* 霓虹灯光效果 */
        .neon-glow {
            position: fixed;
            width: 400px;
            height: 400px;
            border-radius: 50%;
            filter: blur(100px);
            opacity: 0.2;
            z-index: -1;
        }
        
        .neon-glow:nth-child(1) {
            top: -100px;
            left: -100px;
            background: #00f2ff;
        }
        
        .neon-glow:nth-child(2) {
            bottom: -100px;
            right: -100px;
            background: #9d4edd;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 40px 20px;
        }
        
        h1 {
            text-align: center;
            margin-bottom: 60px;
            color: #ffffff;
            font-family: 'Orbitron', sans-serif;
            font-weight: 700;
            font-size: 3.5rem;
            text-transform: uppercase;
            letter-spacing: 4px;
            background: linear-gradient(90deg, #00f2ff, #9d4edd);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            position: relative;
            text-shadow: 0 0 15px rgba(0, 242, 255, 0.5);
        }
        
        h1::after {
            content: '';
            position: absolute;
            bottom: -20px;
            left: 50%;
            transform: translateX(-50%);
            width: 200px;
            height: 2px;
            background: linear-gradient(90deg, transparent, #00f2ff, transparent);
        }
        
        .portfolio-container {
            max-width: 1300px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(550px, 1fr));
            gap: 40px;
        }
        
        .video-item {
            background: rgba(16, 16, 30, 0.7);
            border: 1px solid rgba(0, 242, 255, 0.2);
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
            transition: all 0.4s ease;
            cursor: pointer;
            backdrop-filter: blur(10px);
            position: relative;
        }
        
        .video-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, transparent, #00f2ff, transparent);
            transform: scaleX(0);
            transition: transform 0.5s ease;
        }
        
        .video-item:hover {
            transform: translateY(-10px);
            box-shadow: 0 15px 40px rgba(157, 78, 221, 0.2);
            border-color: rgba(0, 242, 255, 0.5);
        }
        
        .video-item:hover::before {
            transform: scaleX(1);
        }
        
        .video-thumbnail {
            width: 100%;
            aspect-ratio: 16/9;
            background-color: #000;
            position: relative;
            overflow: hidden;
        }
        
        .video-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: all 0.5s ease;
            filter: brightness(0.8);
        }
        
        .video-item:hover .video-thumbnail img {
            filter: brightness(1) contrast(1.1);
            transform: scale(1.05);
        }
        
        /* 科技感播放按钮 */
        .play-icon {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 90px;
            height: 90px;
            background: rgba(0, 242, 255, 0.1);
            border: 2px solid rgba(0, 242, 255, 0.8);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: all 0.4s ease;
            box-shadow: 0 0 30px rgba(0, 242, 255, 0.5);
            backdrop-filter: blur(5px);
        }
        
        .video-item:hover .play-icon {
            opacity: 1;
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0% {
                box-shadow: 0 0 30px rgba(0, 242, 255, 0.5);
            }
            50% {
                box-shadow: 0 0 40px rgba(0, 242, 255, 0.8);
            }
            100% {
                box-shadow: 0 0 30px rgba(0, 242, 255, 0.5);
            }
        }
        
        .play-icon::after {
            content: '';
            width: 0;
            height: 0;
            border-left: 26px solid #00f2ff;
            border-top: 18px solid transparent;
            border-bottom: 18px solid transparent;
            margin-left: 8px;
        }
        
        .video-info {
            padding: 25px;
        }
        
        .video-title {
            font-size: 1.3rem;
            font-weight: 600;
            margin-bottom: 10px;
            color: #ffffff;
            font-family: 'Rajdhani', sans-serif;
            letter-spacing: 1px;
            position: relative;
            display: inline-block;
        }
        
        .video-title::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 100%;
            height: 1px;
            background: linear-gradient(90deg, #00f2ff, transparent);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }
        
        .video-item:hover .video-title::after {
            transform: scaleX(1);
        }
        
        /* 科技感模态框 */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(rgba(10, 10, 22, 0.95), rgba(10, 10, 22, 0.98));
            z-index: 1000;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(5px);
            animation: fadeIn 0.5s ease;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }
        
        .modal-content {
            position: relative;
            max-width: 90%;
            max-height: 85vh;
            transform: scale(0.95);
            opacity: 0;
            animation: modalOpen 0.4s ease forwards 0.1s;
        }
        
        @keyframes modalOpen {
            to {
                transform: scale(1);
                opacity: 1;
            }
        }
        
        /* 科技感关闭按钮 */
        .close-button {
            position: absolute;
            top: 30px;
            right: 40px;
            color: #00f2ff;
            font-size: 48px;
            font-weight: 300;
            cursor: pointer;
            z-index: 1001;
            transition: all 0.3s ease;
            text-shadow: 0 0 15px rgba(0, 242, 255, 0.7);
            font-family: 'Rajdhani', sans-serif;
            width: 50px;
            height: 50px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(0, 242, 255, 0.3);
            border-radius: 50%;
            background: rgba(10, 10, 22, 0.5);
            backdrop-filter: blur(10px);
        }
        
        .close-button:hover {
            transform: scale(1.1);
            color: #ffffff;
            border-color: rgba(0, 242, 255, 0.8);
            background: rgba(157, 78, 221, 0.2);
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .portfolio-container {
                grid-template-columns: 1fr;
                gap: 30px;
            }
            
            h1 {
                font-size: 2.5rem;
                letter-spacing: 2px;
            }
            
            .video-thumbnail {
                aspect-ratio: 16/9;
            }
            
            .play-icon {
                width: 70px;
                height: 70px;
            }
            
            .play-icon::after {
                border-left: 20px solid #00f2ff;
                border-top: 14px solid transparent;
                border-bottom: 14px solid transparent;
                margin-left: 7px;
            }
            
            .close-button {
                font-size: 36px;
                top: 20px;
                right: 20px;
                width: 40px;
                height: 40px;
            }
        }
        
        /* 视频控件样式增强 */
        video {
            width: 100%;
            height: auto;
            border-radius: 8px;
            box-shadow: 0 0 40px rgba(0, 242, 255, 0.3);
            outline: none;
        }
        
        video::-webkit-media-controls {
            background: rgba(10, 10, 22, 0.7);
            backdrop-filter: blur(10px);
        }
        
        video::-webkit-media-controls-play-button {
            background-color: rgba(0, 242, 255, 0.8);
            border-radius: 50%;
        }
        
        video::-webkit-media-controls-fullscreen-button {
            background-color: rgba(0, 242, 255, 0.3);
            border-radius: 50%;
        }
        
        /* 加载动画 */
        .loading-spinner {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 1002;
        }
        
        .spinner {
            width: 60px;
            height: 60px;
            border: 3px solid rgba(0, 242, 255, 0.3);
            border-radius: 50%;
            border-top-color: #00f2ff;
            animation: spin 1s ease-in-out infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
    </style>
</head>
<body>
    <!-- 霓虹灯光效果 -->
    <div class="neon-glow"></div>
    <div class="neon-glow"></div>
    
    <div class="container">
        <h1>科技感视频作品集</h1>
        
        <div class="portfolio-container" id="portfolio-container">
            <!-- 视频项将通过JavaScript动态生成 -->
        </div>
    </div>
    
    <!-- 视频播放模态框 -->
    <div class="modal" id="video-modal" onclick="closeModal()">
        <span class="close-button" onclick="closeModal()">×</span>
        <div class="modal-content">
            <video id="modal-video" controls></video>
        </div>
    </div>
    
    <!-- 加载动画 -->
    <div class="loading-spinner" id="loading-spinner">
        <div class="spinner"></div>
    </div>
    </style>
</head>
<body>
    <h1>个人剪辑作品集</h1>
    
    <div class="portfolio-container" id="portfolio-container">
        <!-- 视频项将通过JavaScript动态生成 -->
    </div>
    
    <!-- 视频播放模态框 -->
    <div class="modal" id="video-modal" onclick="closeModal()">
        <span class="close-button" onclick="closeModal()">&times;</span>
        <div class="modal-content">
            <video id="modal-video" controls></video>
        </div>
    </div>
    
    <script>
        // 视频文件列表（按文件名字典序排序）
        const videos = [
            "111.mp4",
            "12d3f2fd205e8a1b43123b62ec706585.mp4",
            "222.mp4",
            "333.mp4"
        ];
        
        // 创建科技感视频缩略图
        function generateVideoThumbnail(videoName) {
            const canvas = document.createElement('canvas');
            canvas.width = 800;
            canvas.height = 450;
            const ctx = canvas.getContext('2d');
            
            // 绘制深色背景
            const gradient = ctx.createLinearGradient(0, 0, canvas.width, canvas.height);
            const baseHue = (videoName.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0) % 60) + 200; // 紫色到蓝色的范围
            gradient.addColorStop(0, `hsl(${baseHue}, 70%, 15%)`);
            gradient.addColorStop(1, `hsl(${baseHue + 30}, 80%, 10%)`);
            ctx.fillStyle = gradient;
            ctx.fillRect(0, 0, canvas.width, canvas.height);
            
            // 绘制网格线
            ctx.strokeStyle = `hsla(${baseHue + 20}, 70%, 30%, 0.3)`;
            ctx.lineWidth = 1;
            
            // 横向网格
            const gridSize = 40;
            for (let i = 0; i <= canvas.height; i += gridSize) {
                ctx.beginPath();
                ctx.moveTo(0, i);
                ctx.lineTo(canvas.width, i);
                ctx.stroke();
            }
            
            // 纵向网格
            for (let i = 0; i <= canvas.width; i += gridSize) {
                ctx.beginPath();
                ctx.moveTo(i, 0);
                ctx.lineTo(i, canvas.height);
                ctx.stroke();
            }
            
            // 绘制科技感装饰线条
            ctx.strokeStyle = `hsl(${baseHue}, 90%, 50%)`;
            ctx.lineWidth = 2;
            ctx.globalAlpha = 0.7;
            
            // 随机科技线条
            for (let i = 0; i < 5; i++) {
                const x1 = Math.random() * canvas.width * 0.3;
                const y1 = Math.random() * canvas.height;
                const x2 = x1 + Math.random() * canvas.width * 0.7;
                const y2 = Math.random() * canvas.height;
                
                ctx.beginPath();
                ctx.moveTo(x1, y1);
                ctx.lineTo(x2, y2);
                ctx.stroke();
            }
            
            // 绘制发光效果
            ctx.globalAlpha = 1;
            const glowX = canvas.width * 0.7;
            const glowY = canvas.height * 0.3;
            
            // 渐变圆形发光
            const glowGradient = ctx.createRadialGradient(
                glowX, glowY, 0,
                glowX, glowY, 150
            );
            glowGradient.addColorStop(0, `hsla(${baseHue - 20}, 90%, 50%, 0.3)`);
            glowGradient.addColorStop(1, 'transparent');
            ctx.fillStyle = glowGradient;
            ctx.fillRect(0, 0, canvas.width, canvas.height);
            
            // 绘制视频名称
            ctx.fillStyle = 'white';
            ctx.font = 'bold 36px Orbitron, Arial';
            ctx.textAlign = 'center';
            ctx.textBaseline = 'middle';
            ctx.shadowColor = `hsl(${baseHue}, 90%, 50%)`;
            ctx.shadowBlur = 10;
            
            // 截断长文件名
            const displayName = videoName.length > 20 ? videoName.substring(0, 20) + '...' : videoName;
            ctx.fillText(displayName, canvas.width / 2, canvas.height / 2);
            ctx.shadowBlur = 0;
            
            // 添加科技感数字装饰
            ctx.fillStyle = `hsla(${baseHue}, 70%, 60%, 0.5)`;
            ctx.font = '14px Rajdhani, Arial';
            ctx.textAlign = 'left';
            ctx.textBaseline = 'top';
            
            // 在角落添加科技数字
            const stats = [
                `ID: ${Math.floor(Math.random() * 10000).toString().padStart(4, '0')}`,
                `FPS: ${Math.floor(Math.random() * 10) + 25}`,
                `RES: 1920x1080`,
                `CODEC: H.265`
            ];
            
            stats.forEach((stat, index) => {
                ctx.fillText(stat, 20, 20 + index * 20);
            });
            
            // 添加二进制流动效果
            ctx.fillStyle = `hsla(${baseHue}, 70%, 60%, 0.3)`;
            ctx.font = '12px monospace';
            
            for (let i = 0; i < 10; i++) {
                const binaryStr = Array.from({length: 10}, () => Math.round(Math.random())).join('');
                const x = canvas.width - 120;
                const y = 20 + i * 25;
                ctx.fillText(binaryStr, x, y);
            }
            
            return canvas.toDataURL('image/png');
        }
        
        // 生成作品集
        function generatePortfolio() {
            const container = document.getElementById('portfolio-container');
            
            videos.forEach(videoName => {
                const videoItem = document.createElement('div');
                videoItem.className = 'video-item';
                videoItem.setAttribute('data-video', videoName);
                
                // 生成缩略图
                const thumbnailUrl = generateVideoThumbnail(videoName);
                
                videoItem.innerHTML = `
                    <div class="video-thumbnail">
                        <img src="${thumbnailUrl}" alt="${videoName}">
                        <div class="play-icon"></div>
                    </div>
                    <div class="video-info">
                        <div class="video-title">${videoName}</div>
                    </div>
                `;
                
                videoItem.addEventListener('click', () => {
                    openVideo(videoName);
                });
                
                container.appendChild(videoItem);
            });
        }
        
        // 打开视频播放（添加科技感加载效果）
        function openVideo(videoName) {
            const modal = document.getElementById('video-modal');
            const modalVideo = document.getElementById('modal-video');
            const loadingSpinner = document.getElementById('loading-spinner');
            
            // 显示加载动画
            loadingSpinner.style.display = 'block';
            
            // 设置视频源
            modalVideo.src = `vedios/${videoName}`;
            
            // 视频加载完成后播放
            modalVideo.onloadeddata = function() {
                // 隐藏加载动画
                loadingSpinner.style.display = 'none';
                
                // 显示模态框
                modal.style.display = 'flex';
                
                // 自动播放视频
                modalVideo.play().catch(error => {
                    console.log('自动播放失败:', error);
                });
            };
            
            // 视频加载错误处理
            modalVideo.onerror = function() {
                loadingSpinner.style.display = 'none';
                alert('视频加载失败，请稍后重试。');
            };
        }
        
        // 关闭视频播放（添加淡出动画）
        function closeModal() {
            const modal = document.getElementById('video-modal');
            const modalVideo = document.getElementById('modal-video');
            
            // 添加淡出动画
            modal.style.opacity = '0';
            modal.style.transition = 'opacity 0.3s ease';
            
            setTimeout(() => {
                // 暂停并重置视频
                modalVideo.pause();
                modalVideo.src = '';
                
                // 隐藏模态框
                modal.style.display = 'none';
                modal.style.opacity = '1';
                modal.style.transition = 'none';
            }, 300);
        }
        
        // 点击ESC键关闭模态框
        document.addEventListener('keydown', (e) => {
            if (e.key === 'Escape') {
                closeModal();
            }
        });
        
        // 初始化作品集
        document.addEventListener('DOMContentLoaded', generatePortfolio);
    </script>
</body>
</html>